package com.carleasoft.mps.core.jackson;

import com.carleasoft.mps.core.enums.BaseEnum;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.datatype.jsr310.PackageVersion;

/**
 * 枚举类自定义系列化规则
 *
 * @author Alay
 * @date 2021-08-16 09:55
 * @project mps
 * @since
 */
public class BaseEnumModule  extends SimpleModule {

    public BaseEnumModule() {
        super(PackageVersion.VERSION);

        // 自定义通用枚举类反系列化处理
        this.addDeserializer(BaseEnum.class, new BaseEnumDeserializer());
    }
}
